package ysm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import ysm.entity.Role;
import ysm.entity.User;


@Mapper
@Component
public interface UserMapper {

	User loadUserByUsername(String username);
	
	User selectByPrimaryKey(Integer id);
	
	void updateByPrimaryKeySelective(User record);

	List<Role> getUserRolesByUid(Integer id);

	void addUser(User user);

	void updateUsernameByUsername(@Param("oldUsername") String oldUsername, @Param("newUsername") String newUsername);

}
